using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Collections;
using System.Web.UI.WebControls;
using OgilvyOne.Model;
using OgilvyOne.IDAL;
using OgilvyOne.BLL.SysManage;

namespace OgilvyOne.BLL
{
    public class Item : Tree
    {
        // Methods
        public string ConvertItem(int Item_ID)
        {
            return OgilvyOne.DALFactory.Item.Create().ConvertItem(Item_ID);
        }

        public string ConvertItem(string item_id)
        {
            return OgilvyOne.DALFactory.Item.Create().ConvertItem(item_id);
        }

        public void Delete(int iNodeID)
        {
            OgilvyOne.DALFactory.Item.Create().DeleteNode(iNodeID);
        }

        public IList getChildNodeList(string isdel, int parent_node_id)
        {
            return OgilvyOne.DALFactory.Tree.ItemCreate().getChildNodeList(isdel, parent_node_id);
        }

        public ItemInfo getCurrItemInfo(int itemid)
        {
            return OgilvyOne.DALFactory.Item.Create().getCurrItemInfo(itemid);
        }

        public IList getCurrNode(string isdel, int nodeid)
        {
            return OgilvyOne.DALFactory.Tree.ItemCreate().getCurrNode(nodeid);
        }

        public int getItemIDByDesc(string item_desc, int parent_item_id)
        {
            return OgilvyOne.DALFactory.Item.Create().getItemIDByDesc(item_desc, parent_item_id);
        }

        public IList getItemList(int parent_item_id)
        {
            return OgilvyOne.DALFactory.Item.Create().getItemList(parent_item_id);
        }

        public void Insert(ItemInfo iinfo)
        {
            OgilvyOne.DALFactory.Item.Create().InsertNode(iinfo);
        }

        public void Update(ItemInfo iinfo)
        {
            OgilvyOne.DALFactory.Item.Create().ModifyNode(iinfo);
        }

    }
}
